import {RouteRecordRaw} from 'vue-router';

import staticRoutes from './modules/static';
import systemRoutes from './modules/system'
import chatRoutes from './modules/chat'
import threeRoutes from './modules/three'
import customer from "@/router/modules/customer";
import AppLayout from '@/layout/AppLayout.vue';

const routes: RouteRecordRaw[] = [
    {
        path: '/',
        component: AppLayout,
        meta: {
            requiresAuth: true,
        },
        children: [
            {
                path: '',
                name: 'home',
                component: () => import('../views/home/home.vue'),
                meta: {
                    title: '首页',
                    icon: 'homeFilled',
                    requiresAuth: true
                },
            },
            staticRoutes,
            systemRoutes,
            chatRoutes,
            customer,
            threeRoutes
        ],
    }, {
        path: '/login',
        component: () => import('../views/login/login.vue'),
    }, {
        path: '/monitor',
        component: () => import('../views/monitor/monitor.vue'),
        meta: {
            requiresAuth: false,
        },
    }
];

export default [...routes];
